package com.longrise.android.byjk.plugins.aboutme;

import android.os.Bundle;

/**
 * Created by sujizhong on 2016/12/19.
 * LFView跳转到其他Activity后，当做onActiviyResult()使用
 * 跳到某个界面后使用 setGarbageCallback()组件
 * 关闭某个界面，如果需要刷新之前界面，使用callBack();
 * bundle用于区分
 *
 * mGarbageinterface 可能会丢失
 *
 */

public class GarbageComponent {

    private static Garbageinterface mGarbageinterface = null;

    public interface Garbageinterface{
        void callback(int state, Bundle bundle);
    }

    public static void setGarbageCallback(Garbageinterface garbageCallback){
        mGarbageinterface = garbageCallback;
    }

    public static void callBack(int status, Bundle bundle){
        if(mGarbageinterface != null){
            mGarbageinterface.callback(status, bundle);
        }
    }

}
